<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
<ui:composition>

	<h3>#{resultsTitle}</h3>
	<h:panelGroup rendered="#{showExportLink}" style="float:right; ">
		<h:commandButton immediate="true" title="Export to CSV" 
			action="#{exportBean.exportResults}"
			image="/icons/page_excel.png" />
	</h:panelGroup>
	
	<c:forEach var="result" items="#{searchResults}">
		<div class="right_articles">
			<p><img src="images/image.gif" alt="Image" title="Image" class="image" />
				<ui:insert name="resultOutput"/>
				<rich:togglePanel value="closed" switchType="client"
					stateOrder="closed,showMore" >
     				<f:facet name="closed">
     					<h:panelGroup rendered="#{not empty result.content and not empty result.content.abstractText}">
     						<rich:toggleControl value="[More]" switchToState="showMore" />
     					</h:panelGroup>
     				</f:facet>
     						
     				<f:facet name="showMore">
     					<h:panelGroup rendered="#{not empty result.content and not empty result.content.abstractText}" >
     					<em>Abstract: </em>#{result.content.abstractText}
     					<rich:toggleControl value=" [Close]" switchToState="closed" />
     					</h:panelGroup>
     				</f:facet>
				</rich:togglePanel>
			</p>
		</div>
	</c:forEach>
	
</ui:composition>
</html>
